package com.lsh.payment.core.model.payenum;

/**
 * Project Name: lsh-payment
 *
 * @author peter
 * @date 17/4/26
 * 北京链商电子商务有限公司
 * Package
 * desc:
 */
public enum PayService {
    /**
     *
     */
    ALIPAY_SERVICE("1","aliPayServiceImpl"),
    WXPAY_SERVICE("2","wxPayServiceImpl"),
    MIS_SERVICE("9","pursePayServiceImpl"),
    PURSE_BALANCE_SERVICE("10","pursePayServiceImpl"),
    PURSE_SERVICE("11","pursePayServiceImpl"),
    CM_WX_PAY_SERVICE("17","cmPayServiceImpl"),
    CM_ALI_PAY_SERVICE("18","cmPayServiceImpl");

    private String code;

    private String name;

    PayService(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getServiceByCode(String code) {
        for (PayService payService : PayService.values()) {
            if (payService.getCode().equals(code)) {
                return payService.getName();
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
